unit Cop_aces;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, Mask, ToolEdit, Con_usua;

type
  TfrmCop_aces = class(TForm)
    edtCod_usua: TComboEdit;
    Label2: TLabel;
    btnOk: TBitBtn;
    procedure btnOkClick(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure edtCod_usuaButtonClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCop_aces: TfrmCop_aces;
  f:TfrmCon_usua;

implementation

{$R *.DFM}

procedure TfrmCop_aces.btnOkClick(Sender: TObject);
begin
  close;
end;

procedure TfrmCop_aces.FormDestroy(Sender: TObject);
begin
  f.Free;
end;

procedure TfrmCop_aces.edtCod_usuaButtonClick(Sender: TObject);
begin
  f.ShowModal;
  edtCod_usua.text:=f.cod_usua;
end;

procedure TfrmCop_aces.FormCreate(Sender: TObject);
begin
  f:=TfrmCon_usua.Create(Self);
end;

procedure TfrmCop_aces.FormActivate(Sender: TObject);
begin
  edtCod_usua.SetFocus;
end;

procedure TfrmCop_aces.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
 if key=27 then close;
end;

end.
